<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <f:view>
            <h:form>
                <h1><h:outputText value="List"/></h1>
                <p:dataTable  value="#{accountBean.accountsByName}" var="item">
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="AccountID"/>
                        </f:facet>
                        <h:outputText value="#{item.accountID}"/>
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="FullName"/>
                        </f:facet>
                        <h:outputText value="#{item.fullName}"/>
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Password"/>
                        </f:facet>
                        <h:outputText value="#{item.password}"/>
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="TelephoneNumber"/>
                        </f:facet>
                        <h:outputText value="#{item.telephoneNumber}"/>
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Email"/>
                        </f:facet>
                        <h:outputText value="#{item.email}"/>
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Status"/>
                        </f:facet>
                        <p:selectBooleanCheckbox value="#{item.status}"/>
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="RoleID"/>
                        </f:facet>
                        <h:outputText value="#{item.roleID.roleName}"/>
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="DepartmentID"/>
                        </f:facet>
                        <h:outputText value="#{item.departmentID.departmentName}"/>
                    </p:column>
                </p:dataTable >
            </h:form>
        </f:view>

    </h:body>
</html>

